home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
308
< prev
next >
Wrap
Text File
|
1996-08-06
|
3KB
|
73 lines
Newsgroups: comp.std.c
Path: tmai.com!usenet
From: Sridhar Panchapakesan <sridharp>
Subject: (no subject)
X-Nntp-Posting-Host: 205.159.65.69
Content-Type: multipart/mixed;
boundary="-------------------------------1458920801586317958839761223"
Message-ID: <1996Feb5.225112.9993@tmai.com>
Sender: usenet@tmai.com (usenet acct for news)
Organization: TMA, Inc.
Mime-Version: 1.0
Date: Mon, 5 Feb 1996 22:51:12 GMT
X-Mailer: Mozilla 1.1 (X11; U; SunOS 4.1.4 sun4m)
X-Url: file: /usr0/home/sridharp/work/misc/querieUnix
This is a multi-part message in MIME format.
---------------------------------1458920801586317958839761223
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
--
-----------------------------------------------------------------------------
sridhar panchapakesan, member of technical staff
e-mail: sridhar_panchapakesan@tmai.com
phone : (415) 856-8862 x279 fax : (415) 856-8860
technology modeling associates, inc. (http://www.tmai.com)
__o
_ \<,_
(*)/ (*)
----- Save Earth
-----------------------------------------------------------------------------
---------------------------------1458920801586317958839761223
Content-Transfer-Encoding: 7bit
Content-Type: text/plain
I am trying to use 'getopt' to read a quoted string as options for a
program. It works fine when I try it from a shell (csh) but when I try
running it from a script using 'exec' it does not accept the entire the
entire quoted string as the option.
e.g. ( test is the program name)
% test -f "-g -o 5" in.txt
( getopt works fine. The string "-g -o 5" is read correctly into
optargs. Note that I have to use '-' (dash) in the string as a
requirement of the program itself.)
However when I try it from the script file:
exec test -f "\"-g -o 5\"" in.txt
The getopt only recognizes "-g as the option for -f instead of "-g -o
5".
I would appreciate any help in this area..
- Sridhar.
-----------------------------------------------------------------------------
sridhar panchapakesan, member of technical staff
e-mail: sridhar_panchapakesan@tmai.com
phone : (415) 856-8862 x279 fax : (415) 856-8860
technology modeling associates, inc. (http://www.tmai.com)
__o
_ \<,_
(*)/ (*)
----- Save Earth
-----------------------------------------------------------------------------
---------------------------------1458920801586317958839761223--